function debounce(func,wait) {
    let timeOut;
    return function () {
        if (timeOut) clearTimeout(timeOut);
        timeOut = setTimeout(()=>{
            func.apply(this)
        },wait)
    }
}
export default debounce;